package com.jy.admin.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.jy.admin.db.dao.AdminTokenDao;
import com.jy.admin.db.entity.AdminTokenEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

/**
* User: anonymous
* Date: 2021-10-25
* Time: 18:06:49.271
*/

@Repository
public class AdminTokenDaoImpl extends AbstractBaseMapper<AdminTokenEntity> implements AdminTokenDao {

    @Override
    public AdminTokenEntity selectOnByAccessToken(String token) {
        Map<String,String> params = new HashMap<>();
        params.put("token",token);
        return getSqlSession().selectOne(this.getStatement("selectOnByAccessToken"), params);
    }

    @Override
    public AdminTokenEntity selectOnByMerchantCode(String code) {
        Map<String,String> params = new HashMap<>();
        params.put("code",code);
        return getSqlSession().selectOne(this.getStatement("selectOnByMerchantCode"), params);
    }
}